package simplebinding.guice;

import simplebinding.impl.DatabaseImplTwo;
import simplebinding.interfaces.Database;

import com.google.inject.AbstractModule;
/**
 * This module will bind DatabaseImplTwo to Database -
 * which is not it's default implementation
 * @author Adam Schaible
 *
 */
public class BinderModule extends AbstractModule {

	/**
	 * Method required by Module to bind.  Here we bind DatabaseImplTwo
	 * to Database instead of it's default binding.  Database's created
	 * with this injector will use the DatabaseImplTwo implementation.
	 */
	public void configure() {
		binder().bind(Database.class).to(DatabaseImplTwo.class);
	}

}
